package com.ftg.learn.controller;

import com.ftg.learn.dto.UserDto;
import com.ftg.learn.service.UserService;
import com.ftg.learn.util.R;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 布衣
 */
@RestController
public class UserController {

    @Resource
    private UserService userService;

    @PostMapping("/login")
    public R<String> login(
        @RequestBody UserDto userDto
    ) {
        return userService.login(userDto);
    }

}
